const express = require('express')
const router = express.Router()

// 导入验证规则模块
const expressJoi = require('@escook/express-joi')
// 导入验证规则
const { login_schema,reg_login_schema }  = require('../schema/user')

// 导入注册接口函数
const userHandler = require('../router-handler/user')

// 注册接口
router.post('/regester',expressJoi(reg_login_schema),userHandler.regester)
// 登录接口
router.post('/login',expressJoi(login_schema),userHandler.login)

module.exports = router